﻿namespace GoodAdmin.System;

/// <summary>
/// 系统组织表
/// </summary>
[SugarTable(tableName: "Sys_Org", "系统组织表")]
public class SysOrg: BaseTreeEntity<SysOrg>
{
    /// <summary>
    /// 组织名称
    /// </summary>
    [SugarColumn(ColumnDescription = "组织名称", Length =128)]
    public virtual string OrgName { get; set; }

    /// <summary>
    /// 组织长名称
    /// </summary>
    [SugarColumn(ColumnDescription = "组织长名称", Length = 256)]
    public virtual string LongName { get; set; }

    /// <summary>
    /// 所属公司Id
    /// </summary>
    public virtual long CompanyId { get; set; }

    /// <summary>
    /// 组织编码
    /// </summary>
    [SugarColumn(ColumnDescription = "组织编码", Length = 64)]
    public string Code { get; set; }

    /// <summary>
    /// 主管ID
    /// </summary>
    [SugarColumn(ColumnDescription = "主管ID", IsNullable = true)]
    public long? ManagerId { get; set; }   

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", Length = 128, IsNullable = true)]
    public string Remark { get; set; }
    /// <summary>
    /// 分类(公司、部门)
    /// </summary>
    [SugarColumn(ColumnDescription = "分类", Length = 128)]
    public string Category { get; set; }

    /// <summary>
    /// 排序码
    /// </summary>
    [SugarColumn(ColumnDescription = "排序码", IsNullable = true)]
    public int? SortCode { get; set; }
}